<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./js/vue.js"></script>
</head>

<body>
    <div id="app">
        <!-- v-html -->
        <div>{{h1Str}}</div>
        <div v-html="'哈哈'+h1Str"></div>
        <div v-html="h1Str+'哈哈'"></div>

        <!-- v-text -->
        <div v-text="h1Str+'呵呵'"></div>
        <div v-text="num+1"></div>
        <div v-text="Math.random()">
            <div>haha</div>
        </div>

        <!-- v-pre -->
        <div v-pre>
            <div v-html="h1Str"></div>
        </div>

        <!-- v-once -->
        <div v-once>
            <div v-html="h1Str"></div>
        </div>
        <div v-html="msg"></div>

        <!-- v-cloak -->
        <p v-cloak>{{h1Str}}</p>
    </div>
</body>
<script>

    setTimeout(function(){
        new Vue({
            el: "#app",
            data: {
                h1Str: "<h1>h1字符串标签</h1>",
                msg: "测试数据",
                num: 10
            }
        });
    },4000)
</script>

</html>